import pymysql




mydb = pymysql.connect(host="192.168.2.131",user="root",password="yd2016",database="ecms4_test_standard",port=3308)

# 创建游标对象
mycursor = mydb.cursor()
# 执行SQL查询
mycursor.execute("SELECT * FROM sys_user LIMIT 1")

# 获取结果
result = mycursor.fetchall()

# 打印结果
for row in result:
  print(row)
# 关闭游标和数据库连接
mycursor.close()